import java.util.Calendar;
import java.util.PriorityQueue;

public class ExpenseReport {
	private Payer payer;
	private Project project;
	private Calendar beginningDate, endDate;
	private Calendar filedDate;
	private PriorityQueue<Receipt> receipts;
	
	public ExpenseReport(Payer payer, Project project, Calendar beginningDate,
			Calendar endDate, Calendar filedDate, PriorityQueue<Receipt> receipts) {
		this.payer = payer;
		this.project = project;
		this.beginningDate = beginningDate;
		this.endDate = endDate;
		this.filedDate = filedDate;
		this.receipts = receipts;
	}

	public Payer getPayer() {
		return payer;
	}
	
	public Project getProject() {
		return project;
	}
	
	public Calendar getBeginningDate() {
		return beginningDate;
	}
	
	public Calendar getEndDate() {
		return endDate;
	}
	
	public Calendar getFiledDate() {
		return filedDate;
	}
	
	public PriorityQueue<Receipt> getReceipts() {
		return receipts;
	}
	
	public double getSubtotal(Receipt.Type type) {
		double subtotal = 0.0;
		for (Receipt receipt : receipts)
			if (receipt.getType() == type)
				subtotal += receipt.getAmount();
		return subtotal;
	}
	
	
}
